package com.ibeeking.found.upms.g.rest.controller.v1.feign;

import com.ibeeking.found.upms.api.common.dto.PermissionDTO;
import com.ibeeking.found.upms.g.rest.service.IGmcPermissionService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName PermissionController控制器
 * @Description
 * @Author ibeeking
 * @Date 2020-12-01 18:15
 **/
@RestController
@RequestMapping("/g/permission/feign/v1")
public class GmcPermissionFeignController {

    @Resource
    private IGmcPermissionService permissionServiceImpl;

    @PostMapping(value = "/queryAllList")
    public List<PermissionDTO> queryAllList(@RequestBody List<String> modules) {
        return permissionServiceImpl.queryByModules(modules);
    }

    @PostMapping(value = "/queryListByIds")
    public List<PermissionDTO> queryListByIds(@RequestBody List<Long> ids) {
        return permissionServiceImpl.queryListByIds(ids);
    }

}
